﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;

namespace eTech_Physics_Sandbox
{
    class ConvertUnits
    {
        static float _pixelpermeter;

        public static void SetScale(float ppm)
        {
            _pixelpermeter = ppm;
        }

        public static float ToMeters(float pixels)
        {
            return pixels / _pixelpermeter;
        }

        public static Vector2 ToMeters(Vector2 pixels)
        {
            return pixels / _pixelpermeter;
        }

        public static float ToPixels(float meters)
        {
            return meters * _pixelpermeter;
        }

        public static Vector2 ToPixels(Vector2 meters)
        {
            return meters * _pixelpermeter;
        }
    }
}
